<template>
    <div class="card" :style="{ background: props.background }">
        <div style="font-size: 16px;font-weight: 700;color: #ffffff;">{{ props.title }}</div>
        <div style="height: 60%;display: flex; justify-content: space-between; margin-top: 20px">
            <div style="width: 30px; margin-left: 20px;">
                <my-svg-icon :name="props.icon || ''" style="width: 100%; height: 100%"></my-svg-icon>
            </div>
            <div style="font-size: 30px; font-weight: bold;">{{ props.value }}</div>
        </div>
    </div>
</template>

<script setup lang="ts">

interface Props {
    title?: string;
    icon?: string;
    value: number;
    background?: string;
}
const props = defineProps<Props>();
</script>

<style scoped>
.card {
    border-radius: 12px;
    height: 100px;
    padding: 8px;
    color: white;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.icon {
    font-size: 1.5rem;
}

.card-number {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 10px;
}
</style>